UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ao0YeUeUr656+YWOSpm3FLfPdxe4GPG9Knd7E3Dj6RE=' 
WHERE 
  key_id = '223ea526a1a98f23766d6798b08338b0f3e4f49da633fe053c573bed7cb03453' 
  AND (
    token = 'ao0YeUeUr656+YWOSpm3FLfPdxe4GPG9Knd7E3Dj6RE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035