UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ebkMGatDXvid53yfJCzYdi0anpDHoNmCn9Yr+HKt/v0=' 
WHERE 
  key_id = 'd7d7a856382d4031a1b545d6635ee498979a6a729ac61d4dcfc3223d7776a33f' 
  AND (
    token = 'ebkMGatDXvid53yfJCzYdi0anpDHoNmCn9Yr+HKt/v0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025