UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jSCd6/QKJyXIASlj3Ec68Nm8yC5ERGmWtUlHJyGqP70=' 
WHERE 
  key_id = '26300c2aee252ee8f6978892baaf98125b4f85e505a0e3f55cd16fff07273fb8' 
  AND (
    token = 'jSCd6/QKJyXIASlj3Ec68Nm8yC5ERGmWtUlHJyGqP70=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015