UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PxKJUXyH5ToB1UACpa9DfSegi5szUpA/+1bkzqY+MVI=' 
WHERE 
  key_id = '11f7928be13bc3635df7eed3ddaad80e8a67f35e9e7c51a10279d80aa7d6d029' 
  AND (
    token = 'PxKJUXyH5ToB1UACpa9DfSegi5szUpA/+1bkzqY+MVI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042