UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w5j/csCFLu1su3T5jgmDs2DRo3gnYu5nr45bHLp9j2E='
WHERE
key_id = '61cb3883f69634b52ad3b8ac22b6967f9cfabb56a0dd24bfead870c677a4bf6b'
AND (
token = 'w5j/csCFLu1su3T5jgmDs2DRo3gnYu5nr45bHLp9j2E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)