UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3CixIqIylAhSXJIz8t0SWgaTmG94QxccJLGs9OGp62g='
WHERE
key_id = '61c5deb44958c2681a652627e5f38b097c0f5e93c389376d854e1ec92ea81679'
AND (
token = '3CixIqIylAhSXJIz8t0SWgaTmG94QxccJLGs9OGp62g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)