UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/IJFlAqPYhqf2M0JW2LmLd76W03r7sPfJ+NsldhlGyI=' 
WHERE 
  key_id = 'acc277081855c5d06e215450c8fc3f6ee82880c3ad010232f61eb7027f28cf43' 
  AND (
    token = '/IJFlAqPYhqf2M0JW2LmLd76W03r7sPfJ+NsldhlGyI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048