UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '94Z2LVjFkZ9Z6Ihmw+iWy6WDsf13KXSPNjEg7NQASvo=' 
WHERE 
  key_id = '2a3c8d69f163217689bc33dc27bb1a8399f6ae38cf9cbd527b759300be1cd5b2' 
  AND (
    token = '94Z2LVjFkZ9Z6Ihmw+iWy6WDsf13KXSPNjEg7NQASvo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031