UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oNnzB2/PM/TdVxg+ml/Snex44ZdC/w3IMv6KcPeIjQc='
WHERE
key_id = 'd2c6d0d0348bcc1b44cb3d4c2c798f0a6c4ec33112281e2180ea609fb07b0f8d'
AND (
token = 'oNnzB2/PM/TdVxg+ml/Snex44ZdC/w3IMv6KcPeIjQc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)