UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dma/JNe0TR6G+5h1bptjJW32HEckDl5U08cChGl9SDY='
WHERE
key_id = '64d7e2b5d7224ad0aa2d1ad678b7ad7588c1a8fcf5377ce91dfddd7876ef4795'
AND (
token = 'Dma/JNe0TR6G+5h1bptjJW32HEckDl5U08cChGl9SDY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)