UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FpxrIAWAE3qwYZQdmJV/VeHbb9wquZfMntDoxr0v60o='
WHERE
key_id = '203dcd9bd418a1646e19babc9e366662c592a5ef11244036015c217bb17b25af'
AND (
token = 'FpxrIAWAE3qwYZQdmJV/VeHbb9wquZfMntDoxr0v60o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)