UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hQqATsuFohWYf87qLxXRMBYQscp/n7YUJ8qktztPJKc='
WHERE
key_id = '98aa4ec2a207aa5659ebb4d5f09fc774297ec7c930c9b9e0e12fd45b801b3815'
AND (
token = 'hQqATsuFohWYf87qLxXRMBYQscp/n7YUJ8qktztPJKc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)