UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iY5lPHrGwmSegLgMGUZFju5JtdA7aNpnSpLE/ZBRHEw=' 
WHERE 
  key_id = '741dc9278c4b5bf1c503548709e8e51339e58d0202c7acca411922a3be003e5b' 
  AND (
    token = 'iY5lPHrGwmSegLgMGUZFju5JtdA7aNpnSpLE/ZBRHEw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035