UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EeLLy+RA76MCmlsPl59FoeMK2dvzGERtMlrCp9eLSJM='
WHERE
key_id = '7dda0a26530f0f20ee18a6c6aed8dd1d59b1d977f3ac0e998147b4eb6c00efea'
AND (
token = 'EeLLy+RA76MCmlsPl59FoeMK2dvzGERtMlrCp9eLSJM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)