UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7/7/UkEJE7Aah7xAE6g8OY6wLTqWD8uhppGNXytCT9U=' 
WHERE 
  key_id = '008b0f5b2cabb6f51c3c02d8502e8bd63d07b13dd6f567c3a62b4a5552108092' 
  AND (
    token = '7/7/UkEJE7Aah7xAE6g8OY6wLTqWD8uhppGNXytCT9U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036