UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wnVnXJBzjhllSyYBYuIrBGv/GsE6XysVo6YhxsbmjqM=' 
WHERE 
  key_id = '86216fa6f5e6075774bea1ef41ff2844f79d6270d49bda6c2caa5b6087e30da3' 
  AND (
    token = 'wnVnXJBzjhllSyYBYuIrBGv/GsE6XysVo6YhxsbmjqM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033