UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hrlomAsZpn9UYw0dw5nxYRjNtvdir/WOuLoJDn8Rp/0=' 
WHERE 
  key_id = '0399211fa2f26c10eac469d4c99a0f8e27a9ba4e438feddfcfc56981bf80de35' 
  AND (
    token = 'hrlomAsZpn9UYw0dw5nxYRjNtvdir/WOuLoJDn8Rp/0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025