UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '11D1gnEbqIsb9DQ6U2v1lkXnyqv00WBwB26vWxYpwGk=' 
WHERE 
  key_id = 'eee9aaaf9844f7609c2607bf448b2e9d9eeedfe19d5cd14a64dd3d78332093e0' 
  AND (
    token = '11D1gnEbqIsb9DQ6U2v1lkXnyqv00WBwB26vWxYpwGk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028