UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AYK/d0jwQ/N6/X1uPeBtgnURLKZUzsCdPAINZUR15Bc='
WHERE
key_id = '68fec3571dbdd5f1e51edd0ad9cde42d1bcb1efa2940a28cb02ffa853d18ad12'
AND (
token = 'AYK/d0jwQ/N6/X1uPeBtgnURLKZUzsCdPAINZUR15Bc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)