UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MMAhSNc1NPs3sngYRywAjn4AH9OJFW7w8modqMS7OHI=' 
WHERE 
  key_id = 'eac26ade7d6bebb0ae96b74cc8116b0d7d54ceae4dade81f6680b70c595d0fb1' 
  AND (
    token = 'MMAhSNc1NPs3sngYRywAjn4AH9OJFW7w8modqMS7OHI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00104