UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1kbZc57mhPrhGzVV2cYAyt7uw/MzjoVd9VftSZaI5xs=' 
WHERE 
  key_id = 'bcbfd0add950c89e636e4cd4ee80b5afac0c28cea93e0dfa3a044d1010bb3b5d' 
  AND (
    token = '1kbZc57mhPrhGzVV2cYAyt7uw/MzjoVd9VftSZaI5xs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037