UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mhnzs0tfLQGytz5mM9+E+KGkhzUzf+9Yv4Q6oozfptc=' 
WHERE 
  key_id = '8964a4765b9d1ea56d98d2eaf55958b65e6e602786b5b4e6fce8239a0e9a9c57' 
  AND (
    token = 'mhnzs0tfLQGytz5mM9+E+KGkhzUzf+9Yv4Q6oozfptc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048