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

Query time 0.00024