UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '68A0WyKcMFMhhPaW2gsAQD4l8ZrcZ8lcoCNTdwC7PQU='
WHERE
key_id = '002d9ef9280244371e4f85c0406cc94f23f90a2349a32546a6a297e77b98c586'
AND (
token = '68A0WyKcMFMhhPaW2gsAQD4l8ZrcZ8lcoCNTdwC7PQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)