UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0pEjNBlWxJNOVfVYH27WXF4448r6/4S9EvS4Pr8cf2c=' 
WHERE 
  key_id = '730a4676964a304df9e7adc296bdbd8a68d7b3607ef67dfe18535476f8514721' 
  AND (
    token = '0pEjNBlWxJNOVfVYH27WXF4448r6/4S9EvS4Pr8cf2c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051