UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '32SCFLDzNhDZMN+94V2v2ZOnw/tCQGGRlOWQL7/MTfY=' 
WHERE 
  key_id = '54620ddfe9db3baf3f5951ee2ee92150fe913c69a577bdc3aa3848aed6ec58d1' 
  AND (
    token = '32SCFLDzNhDZMN+94V2v2ZOnw/tCQGGRlOWQL7/MTfY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027