UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qSv6n8Os/9HJYSoDtAg7DmIvV+ImEvaFJc4EY3e0j54=' 
WHERE 
  key_id = 'e48711263f9913d623e853eef73665fc6e627eff2df93b9dcba58720a6970263' 
  AND (
    token = 'qSv6n8Os/9HJYSoDtAg7DmIvV+ImEvaFJc4EY3e0j54=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033