UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mplYqxjAYJit5dzynKeFTumqKDYSm06JeMhSzHhRHHQ=' 
WHERE 
  key_id = '888f6669607d0dcf1da96192730c83b2bb86f9e43f2fdf9715a0d9b35df3a596' 
  AND (
    token = 'mplYqxjAYJit5dzynKeFTumqKDYSm06JeMhSzHhRHHQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039