UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't/t1UTLQ4ZqYoRpY39yfNNC9SUDRihhyiAAuoJizLW8=' 
WHERE 
  key_id = '654c614895cd1c4ee6cfdeedfbea20cccd210d2c3725588eb6f0113e4fa8ea09' 
  AND (
    token = 't/t1UTLQ4ZqYoRpY39yfNNC9SUDRihhyiAAuoJizLW8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037