UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SNzpNxuUT6e3DczhVfgpX2zm00iZ2J9pgsNPCaIXwnI='
WHERE
key_id = '79b97cae88a6d910cc5e4d6d8d14ac228ea96e498f79a3a1f0e668388c987c53'
AND (
token = 'SNzpNxuUT6e3DczhVfgpX2zm00iZ2J9pgsNPCaIXwnI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)