UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/3MxpSy95v2nPbv3QIhEKo3fplZTIqVcDN1rqc2A8tY=' 
WHERE 
  key_id = '44315b9d4f1e71717eeeac70b5c0369e4bcc3246a779a0332bfae69bf4b97ab7' 
  AND (
    token = '/3MxpSy95v2nPbv3QIhEKo3fplZTIqVcDN1rqc2A8tY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022