UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MlLpwUud7SDAl3k1tVgHg/XPFdOzfDHnylX4M64sKaU=' 
WHERE 
  key_id = '30905c730f358663cf162525dfe39861739b28363cbe13e01c4d2697b825e3c6' 
  AND (
    token = 'MlLpwUud7SDAl3k1tVgHg/XPFdOzfDHnylX4M64sKaU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026