UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'H3RPjyVyGSfWjlo+a6podk8VlV/GzDcY8oFwyHaH+0s=' 
WHERE 
  key_id = 'e6f081f9d605c9cd9f732823836ab5590dc6fe923286fa3efbbf3ae64a45bbd5' 
  AND (
    token = 'H3RPjyVyGSfWjlo+a6podk8VlV/GzDcY8oFwyHaH+0s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033