UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jmcL3TAYReXtN02l5GxykxIGUPcPcis5ZsBxJBrjhaI=' 
WHERE 
  key_id = '4deb3fa57bd7f1df65ae8206b69aeb32d9b3e44b2d352e26729b2636bb65eef7' 
  AND (
    token = 'jmcL3TAYReXtN02l5GxykxIGUPcPcis5ZsBxJBrjhaI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030