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

Query time 0.00029