UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'I82e2RcFMzu/SZ/CFGKwYEHntoBYr2AZz6jYqFX1e0A=' 
WHERE 
  key_id = '455874ea7fd75763efac01751a8ebdc4dc60fce685df2b1708a6e97864101eb4' 
  AND (
    token = 'I82e2RcFMzu/SZ/CFGKwYEHntoBYr2AZz6jYqFX1e0A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033