UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1cZmwbgeSPSuSBODSrpCjLHLK7Wo2S4Jg5RCXVbg474=' 
WHERE 
  key_id = '4c065c1c46d1eb4f4298a129567e82d9e54d5753a32ccff348625607d45465b3' 
  AND (
    token = '1cZmwbgeSPSuSBODSrpCjLHLK7Wo2S4Jg5RCXVbg474=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019