UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ors85YgauSIUUjWSaoBZ8eL1SJ/n4VN67zOJqhaNueQ=' 
WHERE 
  key_id = '2b4fb7a470e63b3f29f92b2b4a7b5d360627f76146d0c10aaec36605351ed87d' 
  AND (
    token = 'ors85YgauSIUUjWSaoBZ8eL1SJ/n4VN67zOJqhaNueQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038