UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JbPTG9r0AW+5OK1aQqoqR+OO5d+QkU3RO0ylEIw+jEE=' 
WHERE 
  key_id = 'de34868212506688643a89505f88fab66f212062d759aaee74344cda9e1951c1' 
  AND (
    token = 'JbPTG9r0AW+5OK1aQqoqR+OO5d+QkU3RO0ylEIw+jEE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049