UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VQSVWYeHvMlwXdLyaeryDAjXcJfIP540OtJoJHOntDU='
WHERE
key_id = '90717bd87af75d603508d1b03dbd269dc8d5a300032e589dc81734479e44fb5b'
AND (
token = 'VQSVWYeHvMlwXdLyaeryDAjXcJfIP540OtJoJHOntDU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)