UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hQU6AFQ265jZIAhrAw0glvO/cQSYR0cFgoXZxVx1z9M='
WHERE
key_id = '0dece83b38449d5adf53b1159233e6d05f7f09cdec6853faee0cc880e5d72c79'
AND (
token = 'hQU6AFQ265jZIAhrAw0glvO/cQSYR0cFgoXZxVx1z9M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)