UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GdZoONn0fK+sY0Eb6BRTb7Py72o0nfdJgcW6eTqz0UE='
WHERE
key_id = 'bfc2270c6d3a01f8208ce542dfe3f4c57ed914a46ea0c8c787f2027084f65a92'
AND (
token = 'GdZoONn0fK+sY0Eb6BRTb7Py72o0nfdJgcW6eTqz0UE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)