UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'njYP9t8ySyE3Pn3hbiHqzy+ICigNTWWt9Lf6c98WsyU='
WHERE
key_id = '5fc1ac6c343854c33f226c88bb9e70652b7e3413ab0005714e6158f432effa59'
AND (
token = 'njYP9t8ySyE3Pn3hbiHqzy+ICigNTWWt9Lf6c98WsyU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)