UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jq/zhbwBteF0OX0lYXDR7fPrWS+mnxGtvHcn2DFD6ZU=' 
WHERE 
  key_id = 'e53ea3aca04de3cd24b665655fffabe776c3fd9c3241515a748978c2cc53ebe8' 
  AND (
    token = 'jq/zhbwBteF0OX0lYXDR7fPrWS+mnxGtvHcn2DFD6ZU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027