UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UxkkcsNJ4p4l9ZMJAg8/+1oAdQ8T0JSeWjR9C5KaXNg='
WHERE
key_id = '5e7c5665e3035bc1b9e8a22c0564c8f726b3317541a8c4d19e604f24468cdd6c'
AND (
token = 'UxkkcsNJ4p4l9ZMJAg8/+1oAdQ8T0JSeWjR9C5KaXNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)